package com.itheima.collectiondemo;

import java.util.LinkedList;

/**
 * @Author 王加鑫
 * @Date 2021/5/13 16:39
 * @Version 1.0
 * 队列
 */
public class MyQueue {

    private static LinkedList<Object> queue = new LinkedList<>();

    //加元素
    public void push(Object o){
        queue.addFirst(o);
    }

    //取元素
    public Object pop(){
        return queue.removeLast();
    }
}
